import axios from "@/api/http";
// @ts-ignore
import qs from 'qs'

const login = (params: any = {}) => {
    return axios.post('/auth/login', params)
}
const logout = (params: any = {}) => {
    return axios.post('/auth/logout', params)
}
const register = (params: any = {}) => {
    return axios.post('/auth/adminRegister', params)
}

const refreshToken = (params: any = {}) => {
    return axios.post('/auth/refreshToken', qs.stringify(params))
}
export default {
    login, register, refreshToken,
    logout
}
